Integrand size = 29, antiderivative size = 51 \[ \int \csc (c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=-\frac {3 a A \text {arctanh}(\cos (c+d x))}{2 d}+\frac {2 a A \cot (c+d x)}{d}-\frac {a A \cot (c+d x) \csc (c+d x)}{2 d} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {21, 3873, 3852, 8, 4131, 3855} \[ \int \csc (c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=-\frac {3 a A \text {arctanh}(\cos (c+d x))}{2 d}+\frac {2 a A \cot (c+d x)}{d}-\frac {a A \cot (c+d x) \csc (c+d x)}{2 d} \]
[In]
[Out]
Rule 8
Rule 21
Rule 3852
Rule 3855
Rule 3873
Rule 4131
Rubi steps \begin{align*} \text {integral}& = \frac {A \int \csc (c+d x) (a-a \csc (c+d x))^2 \, dx}{a} \\ & = \frac {A \int \csc (c+d x) \left (a^2+a^2 \csc ^2(c+d x)\right ) \, dx}{a}-(2 a A) \int \csc ^2(c+d x) \, dx \\ & = -\frac {a A \cot (c+d x) \csc (c+d x)}{2 d}+\frac {1}{2} (3 a A) \int \csc (c+d x) \, dx+\frac {(2 a A) \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d} \\ & = -\frac {3 a A \text {arctanh}(\cos (c+d x))}{2 d}+\frac {2 a A \cot (c+d x)}{d}-\frac {a A \cot (c+d x) \csc (c+d x)}{2 d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(137\) vs. \(2(51)=102\).
Time = 0.08 (sec) , antiderivative size = 137, normalized size of antiderivative = 2.69 \[ \int \csc (c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=\frac {2 a A \cot (c+d x)}{d}-\frac {a A \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {a A \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {a A \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a A \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a A \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a A \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d} \]
[In]
[Out]
Time = 1.00 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.31
method | result | size |
parallelrisch | \(\frac {A a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+12 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+8 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}\) | \(67\) |
derivativedivides | \(\frac {A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+2 A a \cot \left (d x +c \right )+A a \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{d}\) | \(71\) |
default | \(\frac {A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+2 A a \cot \left (d x +c \right )+A a \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{d}\) | \(71\) |
parts | \(-\frac {A a \ln \left (\csc \left (d x +c \right )+\cot \left (d x +c \right )\right )}{d}+\frac {A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}+\frac {2 a A \cot \left (d x +c \right )}{d}\) | \(75\) |
norman | \(\frac {\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {A a}{8 d}-\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}+\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{8 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {3 A a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) | \(90\) |
risch | \(\frac {A a \left ({\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}+4 i {\mathrm e}^{2 i \left (d x +c \right )}-4 i\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}+\frac {3 A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}-\frac {3 A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}\) | \(92\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 103 vs. \(2 (47) = 94\).
Time = 0.25 (sec) , antiderivative size = 103, normalized size of antiderivative = 2.02 \[ \int \csc (c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=-\frac {8 \, A a \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, A a \cos \left (d x + c\right ) + 3 \, {\left (A a \cos \left (d x + c\right )^{2} - A a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left (A a \cos \left (d x + c\right )^{2} - A a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
[In]
[Out]
\[ \int \csc (c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=A a \left (\int \csc {\left (c + d x \right )}\, dx + \int \left (- 2 \csc ^{2}{\left (c + d x \right )}\right )\, dx + \int \csc ^{3}{\left (c + d x \right )}\, dx\right ) \]
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.57 \[ \int \csc (c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=\frac {A a {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 4 \, A a \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right ) + \frac {8 \, A a}{\tan \left (d x + c\right )}}{4 \, d} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.82 \[ \int \csc (c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=\frac {A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 8 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {18 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 8 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + A a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
[In]
[Out]
Time = 18.79 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.69 \[ \int \csc (c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=\frac {3\,A\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {A\,a}{8}-A\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {A\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d}+\frac {A\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d} \]
[In]
[Out]